import request from '@/utils/request'

// 查询缺陷列表
export function listDrawback(query) {
  return request({
    url: '/yyj/qc/drawback/list',
    method: 'get',
    params: query
  })
}

// 查询缺陷详细
export function getDrawback(drawbackCode) {
  return request({
    url: '/yyj/qc/drawback/' + drawbackCode,
    method: 'get'
  })
}

// 新增缺陷
export function addDrawback(data) {
  return request({
    url: '/yyj/qc/drawback',
    method: 'post',
    data: data
  })
}

// 修改缺陷
export function updateDrawback(data) {
  return request({
    url: '/yyj/qc/drawback',
    method: 'put',
    data: data
  })
}

// 删除缺陷
export function delDrawback(drawbackCode) {
  return request({
    url: '/yyj/qc/drawback/' + drawbackCode,
    method: 'delete'
  })
}
